package main

import (
	"fmt"
	"reflect"
)

func testInt(b interface{}){
    rval := reflect.ValueOf(b)
	fmt.Printf("rVal kind=%v\n",rval.Kind())
    fmt.Printf("val type=%T\n",rval)
    rval.Elem().SetInt(110)
    fmt.Printf("val=%v\n",rval)
}

func main(){
    var num int =20
    testInt(&num)
    fmt.Println("num=",num)

	str :="tom"
	fs :=reflect.ValueOf(&str)
	fs.Elem().SetString("jack")
	fmt.Printf("%v\n",str)

}